home *** CD-ROM | disk | FTP | other *** search
- class DebrisField extends MovieClipHolder
- {
- var bfield;
- var mc;
- function DebrisField()
- {
- super(_root.createEmptyMovieClip("debrisField",-9));
- this.bfield = new flash.display.BitmapData(Stage.width,Stage.height,true,0);
- this.updateField();
- }
- function addDebris(debris)
- {
- var _loc3_ = new flash.geom.Matrix();
- _loc3_.rotate(CustomMath.degToRad(debris.getMovie()._rotation));
- var _loc5_ = new flash.geom.Matrix();
- _loc5_.translate(debris.getMovie()._x,debris.getMovie()._y);
- _loc3_.concat(_loc5_);
- if(_root.effects >= 2)
- {
- this.bfield.draw(debris.getMovie(),_loc3_,new flash.geom.ColorTransform(1,1,1,0.25,0,0,0,0),"add");
- }
- else
- {
- this.bfield.draw(debris.getMovie(),_loc3_,new flash.geom.ColorTransform(1,1,1,0.25,0,0,0,0));
- }
- }
- function clearField()
- {
- this.bfield.fillRect(new flash.geom.Rectangle(0,0,Stage.width,Stage.height),0);
- }
- function dimField()
- {
- this.bfield.colorTransform(this.bfield.rectangle,new flash.geom.ColorTransform(0.65,0.65,0.65,1,0,0,0,0));
- }
- function updateField()
- {
- this.mc.attachBitmap(this.bfield,this.mc.getNextHighestDepth());
- }
- }
-